package cz.hanis.android.geography;

import android.util.Log;

public class GradeEvaluator {

	public static final String EXCELLENT = "Hustě dobře!";
	public static final String VERY_GOOD  = "Docela dobrý";
	public static final String GOOD  = "Ujde to";
	public static final String SUFFICIENT  = "Nic moc";
	public static final String INSUFFICIENT  = "Hóódně špatný";	
	
	
	public static String getResultGrade(int correct, int all) {		
		double percentage = (correct/(all*1.0)) * 100;
		Log.d("GradeEvaluator", "perc: " + percentage);
		if(percentage >= 90) {
			return GradeEvaluator.EXCELLENT;
		} else if(percentage >= 75) {
			return GradeEvaluator.VERY_GOOD;
		} else if(percentage >= 50) {
			return GradeEvaluator.GOOD;
		} else if(percentage >= 25) {
			return GradeEvaluator.SUFFICIENT;
		} else {
			return GradeEvaluator.INSUFFICIENT;
		}
	}		
	
}
